import request from '@/utils/request'

export function uploadAvatar(data,info) {
  return request({
    url: '/uploadAvatar',
    method: 'post',
    data,
    params:info
  })
}

export function updateAvatar(data,info) {
  return request({
    url: '/updateAvatar',
    method: 'post',
    data,
    params:info
  })
}

export function deleteImage(imgUrl) {
  return request({
    url: '/deleteImage',
    method: 'delete',
    params: imgUrl
  })
}
export function updatePassword(data) {
  return request({
    url: '/updatePassword',
    method: 'put',
    data
  })
}

// 重置密码
export function resetPassword(data) {
  return request({
    url: '/resetPassword',
    method: 'put',
    params:data
  })
}


export function getBarChartData() {
  return request({
    url: '/getBarChartData',
    method: 'get',
  })
}

export function getTotalCount() {
  return request({
    url: '/getTotalCount',
    method: 'get',
  })
}

export function getPieChartData() {
  return request({
    url: '/getPieChartData',
    method: 'get',
  })
}
